<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<link href="./css/innerstyle.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">

function ajaxFunction(){
  var xmlHttp;
  try {
    // Firefox, Opera 8.0+, Safari
    xmlHttp=new XMLHttpRequest();//状态变成0
  } catch (e) {
    // Internet Explorer
    try {
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e) {
        alert("您的浏览器不支持AJAX！");
        return false;
      }
    }
  }

  xmlHttp.onreadystatechange=function() {
    if(xmlHttp.readyState==4) {
    	document.myForm.info.value=xmlHttp.responseText;
    }
  }
  
  var username = document.myForm.username.value;
  xmlHttp.open("GET","Ajax?username="+username,true);//状态从0变成1
  xmlHttp.send(null);//请求已发送，状态变成2

  
}
</script>
</head>
<body>
<!--main start -->
<div id="main">
	
	<!--left panel start -->
	<jsp:include page="common/left.jsp"></jsp:include>
	<!--left panel end -->
	
	<!--right panel start -->
	<div id="right">
		
		<jsp:include page="common/header.jsp"></jsp:include>
		
		<!--rightBotMain start -->
<!--rightBotMain start -->
<div class="contactMain">
	<!--rightBot start -->
	<!--rightBot end -->
	<br class="spacer" />

	<!--best start 右侧内容部分-->
	<div id="best">
		<form name="myForm" action="register.do" method="post">
		<h2><span>用户注册</span></h2>
		<p class="bestTxt">
		</p>
		<p class="bestTxt2 style4"><span class="errortext">*</span>为必需填写</p>
		
		<div class="contacttext" id="yourname">
		  <div align="left">用户名：</div>
		</div>
		<div class="contactformfield" id="nametextbox">
		  <div align="left">
		    <input name="username" type="text" class="textboxEffect" onmouseout="ajaxFunction()"/>
		    <span class="style4">*</span>  <input type="text" name="info" id="info" readOnly="true"/></div>
		</div>
		
		<div class="contacttext" id="business">密码：</div>
		<div class="contactformfield" id="businesstextbox">
		  <div align="left">
		    <input name="password" type="password" class="textboxEffect" />
		    <span class="style4">*</span>  </div>
		</div>
		
		<div class="contacttext" id="email">重复密码：</div>
		<div class="contactformfield" id="emailtextbox">
		  <div align="left">
		    <input name="repassword" type="password" class="textboxEffect" />
		    <span class="style4">*</span>  </div>
		</div>
		
		<div class="contacttext" id="phone">手机号：</div>
		<div class="contactformfield" id="phonetextbox">
		  <div align="left">
	    <input name="phone" type="text" class="textboxEffect" />
		    <span class="style4">*</span>  </div>
		</div>
		
		<div class="contacttext" id="cell">邮箱：</div>
		<div class="contactformfield" id="celltextbox">
		  <div align="left">
		    <input name="email" type="text" class="textboxEffect" />
		  </div>
		</div>
		
		<div class="contactformfield" id="submittext">
		  <p align="left" class="bestTxt4"><input type="submit" value="注册"/><br />
		   ${error }
		  </p>
		  ${error }
		</div>
		</form>
		<br class="spacer" />
	</div>
	<!--best end -->

</div>
<!--rightBotMain end -->
		<!--rightBotMain end -->
	
		
		<br class="spacer" />
	</div>
	<!--right panel end -->
	<br class="spacer" />
</div>
<!--main end -->

<!--footerMain start -->
<div id="footerMain">
	<jsp:include page="common/footer.jsp"></jsp:include>
</div>
<!--footerMain end -->
</body>
</html>